package cyc.learn.mode.factory.many;

import cyc.learn.mode.factory.ordinary.EmailSender;
import cyc.learn.mode.factory.ordinary.Sender;
import cyc.learn.mode.factory.ordinary.SmsSender;

/**
 * 多工厂模式：
 * 解决了简单工厂模式type错误的问题
 * 弊端：随着类型越来越多，工厂的方法也会越来越多
 */
public class SendManyFactory {

    public Sender produceEmail() {
        return new EmailSender();
    }

    public Sender produceSms() {
        return new SmsSender();
    }
}
